import { _decorator, Component, instantiate, IVec2, Node } from 'cc';
import DataManager from '../../Global/DataManager';
import { EntityTypeEnum, IActor, InputTypeEnum } from '../../Common';
import { EntityManager } from '../../Base/EntityManager';
import { EntityStateEnum } from '../../Enum';
import { WeaponMgr } from '../Weapon/WeaponMgr';
import { rad2Angle } from '../../Utils';
import { ExplosionStateMachine } from './ExplosionStateMachine';
const { ccclass, property } = _decorator;

@ccclass('ExplosionMgr')
export class ExplosionMgr extends EntityManager {
    type:EntityTypeEnum;
    private wp :WeaponMgr = null;
    init(type:EntityTypeEnum,{x,y}:IVec2) {
        this.type = type;
        this.node.setPosition(x,y);
        this.fsm = this.addComponent(ExplosionStateMachine);
        this.fsm.init(type);

        this.state = EntityStateEnum.Idle;
    }
}


